<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
     <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>加班审批</title>
</head>
<body>
<style type="text/css">
	body{
		background: gray;
	}
	.index-body1{
		padding: 50px 25px;
    	background-color: #f3f3f3;
	}
	.index-body2{
		width: 100%;
	    height: 100%;
	   	background-color: #fff;
	}
	.index-body3{
		min-width: 950px;
	     padding: 20px;
	    position: relative;
	}
	.top{
		font-size: 12px;
		margin-bottom: 20px;
	}
	.top-title{
		margin: 0;
   		padding: 5px 10px;
    	display: table;
    	width: 100%;
	}
	.top-title div{
		float: left;
		padding: 0;
	}
	.title-left{
		font-weight: 700;
		width: 16%;
		text-align: right;
	}
	.title-right{
		width: 84%;
	}
	.top-body{
    	width: 97%;
    	display: table;
    	padding: 10px 15px;
    	border: 1px solid #E5E6E7;
	}
	
	.body-cen-div div{
		height: 28px;
    	padding: 0;
    	line-height: 28px;
    	color: #666;
    	float: left;
    	border: 1px solid #E5E6E7;
	}
	.cen-div-qian{
		background-color: #F2F2F2;
    	font-weight: 700;
    	width: 17%;
    	text-align: right;
	}
	.cen-div-hou{
		text-overflow: ellipsis;
    	white-space: nowrap;
    	overflow: hidden;
    	width: 33%;
	}
	.center,.bottom{
		margin-bottom: 20px;
	}
	.shengpi{
		display: block;
    	color: #1AB394;
    	font-weight: 700;
	}
	.center-body{
		margin: 10px 0px;
	    min-height: 130px;
	    background-color: rgba(255,255,255,1);
	    box-sizing: border-box;
	    border-width: 1px;
	    border-style: solid;
	    border-color: rgba(229,230,231,1);
	    border-radius: 2px;
	    position: relative;
	    padding: 20px;
	}
	.center-shengpi{
		width: 60px;
	    height: 100px;
	    margin-right: 50px;
	    float: left;
	    position: relative;
	}
	.center-shengpi img{
		width: 60px;
    	height: 60px;
    	border-radius: 30px;
	}
	.text-center{
		width: 16px;
	    height: 16px;
	    text-align: center;
	    background-color: rgba(24,166,137,1);
	    position: absolute;
	    line-height: 20px;
	    right: 4px;
	    top: 45px;
	    border-radius: 50%;
	}
	.center-shengpi-name{
		padding-top: 10px;
		text-align: center;
   		font-size: 12px;
    	color: #666;
	}
	.text-jilu{
		background-color: rgba(25,170,141,1);
    	color: #fff;
    	height: 26px;
	    line-height: 26px;
	    text-align: center;
	    font-size: 13px;
	    border-top-left-radius: 2px;
	    border-top-right-radius: 2px;
	    width: 130px;
	    margin-right: 2px;
	    cursor: pointer;
	}
	.bottom-body{
		border: 1px solid #E5E6E7;
    	padding: 30px 15px;
    	font-size: 13px;
    	width: 97%;
    	display: table;
	}
	.bottom-body-vie{
		margin-bottom: 10px;
	}
	.bottom-body-vie div{
		position: relative;
    	min-height: 1px;
    	float: left;
	}
	.bottom-body-left{
		text-align: center;
    	height: 30px;
    	line-height: 30px;
    	width: 9%;
	}
	.bottom-body-right{
		border: 2px solid rgba(25,170,141,1);
	    border-radius: 2px;
	    background-color: rgba(25,170,141,.2);
	    color: #19AA8D;
	    height: 30px;
	    line-height: 30px;
	    width: 90%;
	}
	.xian{
		width: 1px;
	    height: 45px;
	    border: 1px solid #19AA8D;
	    background:#19AA8D;
	    position: absolute;
	    left: 28.5px;
	    top: -2px;
	}
	.yuan{
		width: 19px;
	    height: 19px;
	    border-radius: 9.5px;
	    background-color: #19AA8D;
	    position: absolute;
	    left: 18px;
	    top: 6px;
	}
	.bottom-body-text{
		width: 20%;
		margin-bottom: 10px;
		text-align: center;
	}
	.pic{
		width: 80px;
	    height: 100px;
	    margin-right: 50px;
	    float: left;
	    position: relative;
	}
	.pic div{
		text-align: center;
	}
	.pic img{
		width: 80px;
	    height: 80px;
	    border-radius: 50%;
	    vertical-align: middle;
	}
	.textsex{
		width: 16px;
	    height: 16px;
	    background-color: rgba(24,166,137,1);
	    position: absolute;
	    line-height: 20px;
	    right: 4px;
	    top: 65px;
	    border-radius: 50%;
	}
	.report-pic{
		padding-top: 10px;
	    font-size: 15px;
	    color: #666;
	}
	.body-cen-div{
		display: flex;
	}
	.btn-bottom{
		width: 450px;
	    height: 30px;
	    margin: 30px auto;
	    display: block;
	}
	.fanhui,.tongguo,.bohui{
		width: 65px;
    	height: 30px;
    	color: white;
    	cursor: pointer;
    	text-align: -webkit-right;
    	font-size: 15px;
    	margin: 5px 15px;
    	border: none;
    	border-radius: 2px
	}
	.fanhui{
    	background: url(static/easyui/themes/icons/fanhui.png) no-repeat 20% 50%;
    	background-color: #F4A328;
	}
	.tongguo{
    	background: url(static/easyui/themes/icons/queding.png) no-repeat 20% 50%;
    	background-color: #19AA8D;
	}
	.bohui{
		background: url(static/easyui/themes/icons/quxiao.png) no-repeat 20% 50%;
    	background-color: #C5221F;
	}
	.modal{
		overflow-x: hidden;
    	overflow-y: auto;
    	opacity: 1;
    	position: fixed;
	    top: 0;
	    right: 0;
	    bottom: 0;
	    left: 0;
	    z-index: 1050;
	    outline: 0;
	    display: none;
	}
	.modal-dialog{
		transform: translate(0,0);
		width: 600px;
    	margin: 30px auto;
    	position: relative;
	}
	.modal-content{
		border: none;
    	border-radius: 4px;
    	box-shadow: 2px 2px 6px rgba(0,0,0,.349019607843137);
    	position: relative;
    	background-color: #fff;
    	background-clip: padding-box;
    	outline: 0;
    	font-size: 12px;
    	color: #999;
	}
	.liyou{
		width: 442px;
    	height: 100px;
    	border: 1px solid #CCCCCC;
    	border-radius: 4px;
    	margin: 10px 60px;
	}
	.modal-header{
		padding: 6px 15px;
		min-height: 16.42857143px;
		border-bottom: 1px solid #e5e5e5;
	}
	.modal-body{
		overflow-y: auto;
    	max-height: 401px;
    	padding: 8px 15px;
    	position: relative;
	}
	.modal-footer{
		padding: 5px 10px;
		text-align: right;
		height:30px;
    	border-top: 1px solid #e5e5e5;
	}
	.btn-close{
		color: #666;
    	background-color: #fff;
    	border-color: #e5e6e7!important;
	}
	.btn-yes{
		color: #fff!important;
    	background-color: #19AA8D!important;
    	border-color: #19AA8D!important;
	}
	.close{
		padding: 0px;
	    opacity: 1;
	    transition: all linear .2s;
	    margin-top: -2px;
	    border: 0;
	    float: right;
	    font-size: 21px;
	    font-weight: 700;
	    line-height: 1;
	    color: #000;
	    text-shadow: 0 1px 0 #fff;
	}
	.modal-backdrop{
		position: fixed;
	    top: 0;
	    right: 0;
	    bottom: 0;
	    left: 0;
	    z-index: 1040;
	    background-color: #000;
	    opacity: .5;
	    display: none;
	}
</style>
<script type="text/javascript">
$(function(){
	$("#fanhui").click(function(){
		add("people");
	});
	$("#tongguo").click(function(){
		var type=$(this).attr("type");
		var id=$(this).attr("tid");
		shen(id,type,1,"1")
	});
	$(".btn-yes").click(function(){
		var type=$("#tongguo").attr("type");
		var id=$("#tongguo").attr("tid");
		var liyou=$(".liyou").val();
		shen(id,type,2,liyou)
		guanbi();
		add("people");
	});
	$("#bohui").click(function(){
		qingkong();
		kaiqi();
	});
	$(".close").click(function(){
		guanbi();
	});
	$(".btn-close").click(function(){
		guanbi();
	});
});
function guanbi(){
	$(".modal").hide();
	$(".modal-backdrop").hide();
}
function kaiqi(){
	$(".modal").show();
	$(".modal-backdrop").show();
}
function shen(id,type,shen,str){
	$.ajax({
		url: "shen-pi", 
		type : "post",
		data: {id:id,type:type,shen:shen,str:str},
		success: function(msg){
	    	if(msg==1){
	    		add("people");
	    	}
		}
	});
}
function qingkong(){
	$(".liyou").html("");
	
}

function add(text){
	$("#content-admin").panel({
		href:text
	});
}

</script>
	<div class="index-body1">
		<div class="index-body2">
			<div class="index-body3">
				<div class="top">
					<div class="top-title">
						<div class="title-left">审批类别：</div>
						<div class="title-right">${staff.type }</div>
					</div>
					<div class="top-body">
						<div class="body-cen">
							<div class="body-cen-div">
								<div class="cen-div-qian">申请人：</div>
								<div class="cen-div-hou">${staff.name }</div>
								<div class="cen-div-qian">申请时间：</div>
								<div class="cen-div-hou"><fmt:formatDate value="${staff.sdate }" pattern="yyyy-MM-dd HH:mm:ss"/></div>
							</div>
							<div class="body-cen-div">
								<div class="cen-div-qian" style="${staff.kai==null?'display:none':'' }">开始时间：</div>
								<div class="cen-div-hou" style="${staff.kai==null?'display:none':'' }">${staff.kai }</div>
								<div class="cen-div-qian" style="${staff.jie==null?'display:none':'' }">结束时间：</div>
								<div class="cen-div-hou" style="${staff.jie==null?'display:none':'' }">${staff.jie }</div>
							</div>
							<div class="body-cen-div">
									<div class="cen-div-qian" style="${staff.leixing==null?'display:none':'' }">类型：</div>
									<div class="cen-div-hou" style="${staff.leixing==null?'display:none':'' }">${staff.leixing }</div>
									<div class="cen-div-qian"  style="${staff.bdate==null?'display:none':'' }">补卡时间：</div>
									<div class="cen-div-hou" style="${staff.bdate==null?'display:none':'' }">${staff.bdate }</div>
									<div class="cen-div-qian" style="${staff.dizhi==null?'display:none':'' }">出差地址：</div>
									<div class="cen-div-hou" style="${staff.dizhi==null?'display:none':'' }">${staff.dizhi }</div>
									<div class="cen-div-qian" style="${staff.yuan==null?'display:none':'' }">申请原因：</div>
									<div class="cen-div-hou" style="${staff.yuan==null?'display:none':'' }">${staff.yuan}</div>
									<div class="cen-div-qian" style="${staff.bukadate==null?'display:none':'' }">补卡时间：</div>
									<div class="cen-div-hou" style="${staff.bukadate==null?'display:none':'' }">${staff.bukadate}</div>
							</div>
							<div class="body-cen-div" >
							<div class="cen-div-qian" style="${staff.shijian==null?'display:none':'' }">时长：</div>
								<div class="cen-div-hou" style="${staff.shijian==null?'display:none':'' }">${staff.shijian }</div>
								<div class="cen-div-qian" style="${staff.noyuan==null?'display:none':'' }">未申请原因：</div>
								<div class="cen-div-hou" style="${staff.noyuan==null?'display:none':'' }">${staff.noyuan }</div>
							</div>
						</div>
					</div>
				</div>
				<div class="center">
					<span class="shengpi">审批人</span>
					<div class="center-body">
						<div class="pic">
							<img src="${pstaff.Staff_tupian==null?'static/easyui/themes/icons/notui.jpg':'' }${pstaff.Staff_tupian}"/>
							<div class="textsex"></div>
							<div class="report-pic">${pstaff.Staff_name }</div>
						</div>
					</div>
				</div>
				<div class="text-jilu">过程记录</div>
				<div class="bottom">
					<div class="bottom-body">
						<div class="bottom-body-vie" style="${staff.pdate==null?'display:none':'' }">
							<div class="bottom-body-left">
								<div class="xian"></div>
								<div class="yuan"></div>
							</div>
							<div class="bottom-body-right">
								<div class="bottom-body-text"><fmt:formatDate value="${staff.pdate}" pattern="yyyy-MM-dd HH:mm:ss"/></div>
								<div class="bottom-body-text">一级审批</div>
								<div class="bottom-body-text">${pstaff.Staff_name }</div>
								<div class="bottom-body-text">${staff.shen==1?'通过':'驳回' }</div>
								<div class="bottom-body-text" style="${staff.bouwhy==null?'display:none':'' }">理由:${staff.bouwhy}</div>
							</div>
						</div>
					</div>
				</div>
				<div class="btn-bottom">
					<button id="fanhui" class="fanhui">返回</button>
					<button id="tongguo" style="${type==2?'display:none':'' }"  class="tongguo" type="${shen }" tid="${id }">通过</button>
					<button id="bohui" style="${type==2?'display:none':'' }" class="bohui">驳回</button>
				</div>
			</div>
		</div>
	</div>
<div class="modal">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button class="close">×</button>
				<h3>驳回理由</h3>
			</div>
			<div class="modal-body">
				<textarea class="liyou" ng-maxlength="500" cols="2"></textarea>
			</div>
			<div class="modal-footer">
				<button class="btn-close">关闭</button>
				<button class="btn-yes">确定</button>
			</div>
		</div>
	</div>
</div>
<div class="modal-backdrop"></div>
</body>
</html>